package com.nettest.example.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name="DEMO")
public class Demo implements BaseEntity  {
	private static final long serialVersionUID = 4133804880979474188L;
	@Id
    @GeneratedValue(strategy=GenerationType.TABLE, generator="hssea_demo")
    @TableGenerator(name = "hssea_demo",
                    table="OBJECT_ID",
                    pkColumnName="NAME",
                    valueColumnName="VALUE",
                    pkColumnValue="HSSEA_DEMO_PK",
                    initialValue=1,
                    allocationSize=1
    )
    private long id;
    @Column(name="CODE")
    private String code;
    @Column(name="DESCRIPTION")
    private String description;
    @Column(name="UPDATE_DATE")
    @Temporal(TemporalType.TIMESTAMP)
    private Date updateDate;
    
    public Date getUpdateDate() {
		return updateDate;
	}
	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}
	public long getId() {
        return id;
    }
    public void setId(long id) {
        this.id = id;
    }
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getDescription() {
        return description;
    }
    public void setDescription(String description) {
        this.description = description;
    }
}
